package model;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;


/**
 * The persistent class for the ORDER_LINE database table.
 * 
 */
@Entity
@Table(name="ORDER_LINE")
public class OrderLine implements Serializable {
	private static final long serialVersionUID = 1L;

	@EmbeddedId
	private OrderLinePK id;

	@Column(name="ORDERED_QUANTITY")
	private BigDecimal orderedQuantity;

	//bi-directional many-to-one association to FactoryOrder
	@ManyToOne
	@JoinColumn(name="ORDER_ID")
	private FactoryOrder factoryOrder;
	private long orderId;

	//bi-directional many-to-one association to Product
	@ManyToOne
	@JoinColumn(name="PRODUCT_ID")
	private Product product;
	private long productId;

	public OrderLine() {
	}

	public OrderLinePK getId() {
		return this.id;
	}

	public void setId(OrderLinePK id) {
		this.id = id;
	}

	public BigDecimal getOrderedQuantity() {
		return this.orderedQuantity;
	}
	public long getorderId() {
		return this.orderId;
	}
	
	public void setorderId(long inorderId) {
		this.orderId = inorderId;
	}
	
	public long getproductId() {
		return this.productId;
	}
	
	public void setproductId(long inproductId) {
		this.productId = inproductId;
	}

	public void setOrderedQuantity(BigDecimal orderedQuantity) {
		this.orderedQuantity = orderedQuantity;
	}

	public FactoryOrder getFactoryOrder() {
		return this.factoryOrder;
	}

	public void setFactoryOrder(FactoryOrder factoryOrder) {
		this.factoryOrder = factoryOrder;
	}

	
	public Product getProduct() {
		return this.product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	
}